package me.wangqu.weiyouqu.web.rest;

import me.wangqu.weiyouqu.web.rest.business.model.BaseModel;
import me.wangqu.weiyouqu.web.rest.business.service.AboutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by joln on 2016/8/2.
 */
@RestController
@RequestMapping("/api")
public class AboutResource {

    @Autowired
    private AboutService aboutService;

    @RequestMapping(value = "/about",
        method = RequestMethod.GET,
        produces = MediaType.APPLICATION_JSON_VALUE)
    public ResponseEntity<List<BaseModel>> getAboutData() {
        return new ResponseEntity<List<BaseModel>>(aboutService.getAboutData(), HttpStatus.OK);

    }


}
